/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */




import java.awt.Component;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/**
 *
 * @author dell
 */
public class fenetredemarrage extends javax.swing.JFrame {

    /**
     * Creates new form fenetredemarrage
     */
    public fenetredemarrage() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();
        jMenuBar2 = new javax.swing.JMenuBar();
        jMenu5 = new javax.swing.JMenu();
        jMenu6 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem14 = new javax.swing.JMenuItem();
        JpannelAffichage = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        medicament = new javax.swing.JButton();
        famille = new javax.swing.JButton();
        fournisseur = new javax.swing.JButton();
        cmd = new javax.swing.JButton();
        vente = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem2 = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JPopupMenu.Separator();
        jMenu2 = new javax.swing.JMenu();
        jMenuItem5 = new javax.swing.JMenuItem();
        jMenuItem8 = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JPopupMenu.Separator();
        jMenuItem10 = new javax.swing.JMenuItem();
        jSeparator3 = new javax.swing.JPopupMenu.Separator();
        jMenuItem11 = new javax.swing.JMenuItem();
        jSeparator4 = new javax.swing.JPopupMenu.Separator();
        jMenuItem12 = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        jMenuItem6 = new javax.swing.JMenuItem();
        jMenu9 = new javax.swing.JMenu();
        jMenuItem15 = new javax.swing.JMenuItem();
        jMenuItem16 = new javax.swing.JMenuItem();
        jMenu10 = new javax.swing.JMenu();
        jMenuItem17 = new javax.swing.JMenuItem();

        jMenuItem3.setText("jMenuItem3");

        jMenuItem4.setText("jMenuItem4");

        jMenu5.setText("File");
        jMenuBar2.add(jMenu5);

        jMenu6.setText("Edit");
        jMenuBar2.add(jMenu6);

        jMenuItem1.setText("jMenuItem1");

        jMenuItem14.setText("jMenuItem14");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        JpannelAffichage.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        JpannelAffichage.setMaximumSize(new java.awt.Dimension(1163, 516));
        JpannelAffichage.setMinimumSize(new java.awt.Dimension(1163, 516));
        JpannelAffichage.setPreferredSize(new java.awt.Dimension(1163, 516));
        JpannelAffichage.setLayout(null);

        jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());
        JpannelAffichage.add(jPanel1);
        jPanel1.setBounds(0, 808, 1166, 0);

        jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/pharmacie_gd.JPG"))); // NOI18N
        JpannelAffichage.add(jLabel8);
        jLabel8.setBounds(370, 50, 660, 400);

        medicament.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/gestion_medicament.png"))); // NOI18N
        medicament.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                medicamentActionPerformed(evt);
            }
        });
        JpannelAffichage.add(medicament);
        medicament.setBounds(60, 150, 230, 40);

        famille.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/famille medicaments.png"))); // NOI18N
        famille.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                familleActionPerformed(evt);
            }
        });
        JpannelAffichage.add(famille);
        famille.setBounds(60, 70, 230, 40);

        fournisseur.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/gestion_fourniseurs.png"))); // NOI18N
        fournisseur.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                fournisseurActionPerformed(evt);
            }
        });
        JpannelAffichage.add(fournisseur);
        fournisseur.setBounds(60, 230, 230, 40);

        cmd.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/gestion_commandes.png"))); // NOI18N
        cmd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cmdActionPerformed(evt);
            }
        });
        JpannelAffichage.add(cmd);
        cmd.setBounds(60, 310, 230, 40);

        vente.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/gestion_ventes.png"))); // NOI18N
        vente.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                venteActionPerformed(evt);
            }
        });
        JpannelAffichage.add(vente);
        vente.setBounds(60, 390, 230, 40);

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/image/d8e8c57e4c07ddfdbe387271e2930732_large.jpeg"))); // NOI18N
        jLabel1.setText("jLabel1");
        JpannelAffichage.add(jLabel1);
        jLabel1.setBounds(-350, 0, 1520, 560);

        getContentPane().add(JpannelAffichage, java.awt.BorderLayout.CENTER);

        jMenuBar1.setBackground(new java.awt.Color(153, 255, 153));

        jMenu1.setText("Fichier");

        jMenuItem2.setText("quitter");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem2);
        jMenu1.add(jSeparator1);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Gestion ");

        jMenuItem5.setText("Famille Médicament");
        jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem5ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem5);

        jMenuItem8.setText("Gestion  des Médicament");
        jMenuItem8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem8ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem8);
        jMenu2.add(jSeparator2);

        jMenuItem10.setText("Gestion de Vente Médicament");
        jMenuItem10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem10ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem10);
        jMenu2.add(jSeparator3);

        jMenuItem11.setText("Gestion des Commandes");
        jMenuItem11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem11ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem11);
        jMenu2.add(jSeparator4);

        jMenuItem12.setText("Gestion des Fournisseurs");
        jMenuItem12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem12ActionPerformed(evt);
            }
        });
        jMenu2.add(jMenuItem12);

        jMenuBar1.add(jMenu2);

        jMenuItem6.setText("Gestion Des Ventes de Médicaments");
        jMenuItem6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem6ActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItem6);

        jMenuBar1.add(jMenu3);

        jMenu9.setText("Outils");

        jMenuItem15.setText("Calculatrice");
        jMenuItem15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem15ActionPerformed(evt);
            }
        });
        jMenu9.add(jMenuItem15);

        jMenuItem16.setText("Bloc-note");
        jMenuItem16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem16ActionPerformed(evt);
            }
        });
        jMenu9.add(jMenuItem16);

        jMenuBar1.add(jMenu9);

        jMenu10.setText("?");

        jMenuItem17.setText("A propos de ..");
        jMenuItem17.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem17ActionPerformed(evt);
            }
        });
        jMenu10.add(jMenuItem17);

        jMenuBar1.add(jMenu10);

        setJMenuBar(jMenuBar1);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
       dispose();
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem5ActionPerformed
       this.hide();
        famille1 fam= new famille1();
        fam.setVisible(true);  
    }//GEN-LAST:event_jMenuItem5ActionPerformed

    private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem6ActionPerformed
        // TODO add your handling code here:
       /* System.out.println("bonjour");
        this.JpannelAffichage.add(new Fournisseur());
        this.JpannelAffichage.revalidate();*/
    }//GEN-LAST:event_jMenuItem6ActionPerformed

    private void jMenuItem11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem11ActionPerformed
 this.hide();
          FCommande cm =new FCommande();
                  cm.setVisible(true);
    }//GEN-LAST:event_jMenuItem11ActionPerformed

    private void jMenuItem12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem12ActionPerformed
       
        this.hide();
          Fournisseur f =new Fournisseur();
                  f.setVisible(true);
          
          
    }//GEN-LAST:event_jMenuItem12ActionPerformed

    private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem8ActionPerformed
        // TODO add your handling code here:
        //this.JpannelAffichage.removeAll();
        //this.JpannelAffichage.revalidate();
        //this.JpannelAffichage.add(new GestionMed());
        this.hide();
        GestionMedi m= new GestionMedi();
        m.setVisible(true);
    }//GEN-LAST:event_jMenuItem8ActionPerformed

    private void jMenuItem15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem15ActionPerformed
        try {
            // TODO add your handling code here:
               this.JpannelAffichage.removeAll();
              this.JpannelAffichage.revalidate();
            Runtime.getRuntime().exec("calc.exe");
            
              this.JpannelAffichage.removeAll();
              //fenetredemarrage fd = new fenetredemarrage();
              //fd.setVisible(true);
        } catch (IOException ex) {
            Logger.getLogger(fenetredemarrage.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem15ActionPerformed

    private void jMenuItem16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem16ActionPerformed
        try {
             
             this.JpannelAffichage.removeAll();
              this.JpannelAffichage.revalidate();
             this.JpannelAffichage.removeAll();
                this.JpannelAffichage.removeAll();
              this.JpannelAffichage.revalidate();
            Runtime.getRuntime().exec("notepad.exe");
             this.JpannelAffichage.removeAll();
        } catch (IOException ex) {
            Logger.getLogger(fenetredemarrage.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jMenuItem16ActionPerformed

    private void jMenuItem10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem10ActionPerformed
        
        this.hide();
          Vente v =new Vente();
                  v.setVisible(true);
    }//GEN-LAST:event_jMenuItem10ActionPerformed

    private void familleActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_familleActionPerformed
   this.hide();
        famille1 fam= new famille1();
        fam.setVisible(true);    
    }//GEN-LAST:event_familleActionPerformed

    private void medicamentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_medicamentActionPerformed
        this.hide();
        GestionMedi m= new GestionMedi();
        m.setVisible(true);
    }//GEN-LAST:event_medicamentActionPerformed

    private void venteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_venteActionPerformed
         this.hide();
          Vente v =new Vente();
                  v.setVisible(true);
    }//GEN-LAST:event_venteActionPerformed

    private void cmdActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cmdActionPerformed
       this.hide();
          FCommande cm =new FCommande();
                  cm.setVisible(true);
    }//GEN-LAST:event_cmdActionPerformed

    private void fournisseurActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_fournisseurActionPerformed
          this.hide();
          Fournisseur f =new Fournisseur();
                  f.setVisible(true);
    }//GEN-LAST:event_fournisseurActionPerformed

    private void jMenuItem17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem17ActionPerformed
        this.hide();
          propo p =new propo();
                  p.setVisible(true);
    }//GEN-LAST:event_jMenuItem17ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(fenetredemarrage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(fenetredemarrage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(fenetredemarrage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(fenetredemarrage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new fenetredemarrage().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel JpannelAffichage;
    private javax.swing.JButton cmd;
    private javax.swing.JButton famille;
    private javax.swing.JButton fournisseur;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu10;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenu jMenu6;
    private javax.swing.JMenu jMenu9;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuBar jMenuBar2;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem10;
    private javax.swing.JMenuItem jMenuItem11;
    private javax.swing.JMenuItem jMenuItem12;
    private javax.swing.JMenuItem jMenuItem14;
    private javax.swing.JMenuItem jMenuItem15;
    private javax.swing.JMenuItem jMenuItem16;
    private javax.swing.JMenuItem jMenuItem17;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JMenuItem jMenuItem4;
    private javax.swing.JMenuItem jMenuItem5;
    private javax.swing.JMenuItem jMenuItem6;
    private javax.swing.JMenuItem jMenuItem8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPopupMenu.Separator jSeparator1;
    private javax.swing.JPopupMenu.Separator jSeparator2;
    private javax.swing.JPopupMenu.Separator jSeparator3;
    private javax.swing.JPopupMenu.Separator jSeparator4;
    private javax.swing.JButton medicament;
    private javax.swing.JButton vente;
    // End of variables declaration//GEN-END:variables
}
